home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-06-30 | 4.1 KB | 118 lines | [TEXT/CWIE] |
- // ===========================================================================
- // LAGAIconDropButton.cp
- // ===========================================================================
- // “Apple Grayscale Appearance” compliant (almost) drop icon button
- // Copyright © 1996 Chrisoft (Christophe ANDRES) All rights reserved.
- //
- // You may use this source code in any application (commercial, shareware, freeware,
- // postcardware, etc), but not remove this notice (no need to acknowledge the use of
- // this class in the about box)
- // You may not sell this source code in any form. This source code may be placed on
- // publicly accessable archive sites and source code disks. It may not be placed on
- // profit archive sites and source code disks without the permission of the author,
- // Christophe ANDRES.
- //
- // This source code is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- //
- // If you make any change or improvement on this class, please send the improved/changed
- // version to : chrisoft@calva.net or Christophe ANDRES
- // 20, rue Prosper Mérimée
- // 67100 STRASBOURG
- // FRANCE
- //
- // ===========================================================================
- // LAGAIconDropButton.h <- double-click + Command-D to see class declaration
- //
- // LAGAIconDropButton is a subclass of LAGAIconButton, and enables the button to accept
- // dropped items. To use it, you must subclass it and override ItemIsAcceptable and
- // ReceiveDragItem (defined in LDragAndDrop)
- //
- // see the comments in LAGAIconButton.h
- //
- // Version : 1.2
- //
- // Change History (most recent first, date in US form : mm/dd/yy):
- //
- // 06/30/96 ca Public release of version 1.2
- // 06/04/96 ca Added static RegisterClass for easier class registration
- // Increased version to 1.2
- // 05/13/96 ca Increased version to 1.1
- // Added copy constructor
- // Added "on the fly" constructor
- // Added change history
- // 04/22/96 ca class made available by Christophe ANDRES <chrisoft@calva.net>
- // (version 1.0)
- //
- // To Do:
- //
-
- #include "LAGAIconDropButton.h"
-
- // begin <06/04/96 ca>
- void LAGAIconDropButton::RegisterClass ()
-
- {
- URegistrar::RegisterClass(LAGAIconDropButton::class_ID, (ClassCreatorFunc)LAGAIconDropButton::CreateAGAIconDropButtonStream);
- }
- // end <06/04/96 ca>
-
- LAGAIconDropButton* LAGAIconDropButton::CreateAGAIconDropButtonStream (LStream *inStream)
-
- {
- return(new LAGAIconDropButton(inStream));
- }
-
- //-------Constructors-------------------------------------------------------------------------------------------------
-
- LAGAIconDropButton::LAGAIconDropButton () : LDragAndDrop(UQDGlobals::GetCurrentPort(), this)
-
- {
- }
-
- LAGAIconDropButton::LAGAIconDropButton (LStream *inStream) : LAGAIconButton(inStream),
- LDragAndDrop(UQDGlobals::GetCurrentPort(), this)
- {
- }
-
- // begin <05/13/96 ca>
- LAGAIconDropButton::LAGAIconDropButton (const LAGAIconDropButton &inOriginal) : LAGAIconButton(inOriginal),
- LDragAndDrop(UQDGlobals::GetCurrentPort(), this)
- {
- }
-
- LAGAIconDropButton::LAGAIconDropButton (const SPaneInfo &inPaneInfo, MessageT inClickedMessage, OSType inIconType,
- ResIDT inIconID, Boolean inRadioButtonBehavior)
- : LAGAIconButton(inPaneInfo, inClickedMessage, inIconType, inIconID, inRadioButtonBehavior),
- LDragAndDrop(UQDGlobals::GetCurrentPort(), this)
- {
- }
- // end <05/13/96 ca>
-
- LAGAIconDropButton::~LAGAIconDropButton ()
-
- {
- }
-
- void LAGAIconDropButton::HiliteDropArea (DragReference inDragRef)
-
- {
- DrawGraphic(true);
- LDragAndDrop::HiliteDropArea(inDragRef);
- }
-
- void LAGAIconDropButton::UnhiliteDropArea (DragReference inDragRef)
-
- {
- LDragAndDrop::UnhiliteDropArea(inDragRef);
- DrawGraphic(false);
- }
-
- Boolean LAGAIconDropButton::ItemIsAcceptable (DragReference inDragRef, ItemReference inItemRef)
-
- {
- return(true);
- }
-
-